home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-02 | 503 b | 26 lines | [TEXT/ToyS] |
- -- This algorithm could be faster. We should look at open
- -- windows and see if they need to be closed, not scan the
- -- entire disk closing everything.
- on closeAll(x)
- close x
- tell application "Finder"
- repeat with sub in x
- if class of sub = folder then
- my closeAll(sub)
- end if
- end repeat
- end tell
- end closeAll
-
- tell application "Finder"
- copy selection to x
- end tell
-
- if class of x = list then
- repeat with entry in x
- copy entry to y
- closeAll(y)
- end repeat
- else
- closeAll(x)
- end if